﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain.MainModule.Entities;
using Domain.MainModule.Repositories;
using Infrastructure.Data.Core;
using Infrastructure.Data.MainModule.UnitOfWork;

namespace Infrastructure.Data.MainModule.Repositories
{
    public class TranslationRepository : Repository<Translations, int>, ITranslationRepository
    {
        public TranslationRepository(IQueryableUnitOfWork unitOfWork) : base(unitOfWork) { }

        public override Translations Get(int id)
        {
            var context = this.UnitOfWork as MainModuleUnitOfWork;
            if (context != null)
            {
                return context.CreateSet<Translations>().Find(id);
            }
            return null;
        }
    }
}
